/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 26727
 * Date: 2025-01-12
 * Time: 10:20
 */
public class Bank{
    private String iban;
    private int balance;

    public Bank(String iban) {
        this.iban = iban;
        this.balance = 0;
    }
    public int getBalance() {
        return this.balance;
    }
    public void despsit(int amount) {
        if(amount>0) {
            this.balance+=amount;
        }else {
            System.out.println("Einzahlung abgebrochen.");
        }
    }
    public void withdraw(int amount) {
        if(amount<=balance) {
            this.balance-=amount;
        }else {
            System.out.println("Auszahlung");
        }
    }
}

